package pers.amos.edu.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
/**
 *
 *
 * @author liuzhm
 * @email ztezhmliu@126.com
 * @date 2019-05-28 15:55:54
 */
@Table(name = "examination_paper")
public class ExaminationPaperEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 试卷编号
     */
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    /**
     * 试卷名
     */
    private String name;
    /**
     * 考试时长（分钟）
     */
    private Integer time;
    /**
     * 试卷描述
     */
    private String description;
    /**
     * 封面图片路径
     */
    private String coverPath;
    /**
     * 创建者
     */
    private String creator;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss",timezone = "GMT+8")
    private Date gmtCreated;
    /**
     * 最后一位修改者
     */
    private String modifier;
    /**
     * 修改时间
     */
    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss",timezone = "GMT+8")
    private Date gmtModified;
    /**
     * 试卷内含题目数量
     */
    @Transient
    private Integer questionsCount;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getTime() {
        return time;
    }

    public void setTime(Integer time) {
        this.time = time;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getCoverPath() {
        return coverPath;
    }

    public void setCoverPath(String coverPath) {
        this.coverPath = coverPath;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public Date getGmtCreated() {
        return gmtCreated;
    }

    public void setGmtCreated(Date gmtCreated) {
        this.gmtCreated = gmtCreated;
    }

    public String getModifier() {
        return modifier;
    }

    public void setModifier(String modifier) {
        this.modifier = modifier;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public Integer getQuestionsCount() {
        return questionsCount;
    }

    public void setQuestionsCount(Integer questionsCount) {
        this.questionsCount = questionsCount;
    }
}

